﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FinalTestMachine.Motion.Process.RunModel
{
    public class WorkModeManager
    {
        public static readonly WorkModeManager Cur = new WorkModeManager();

        private WorkModeManager()
        {
            WorkModeList.Add(new NormalRunMode());
            WorkModeList.Add(new TestRunMode());

            //WorkModeList.Add(new AutoLineRunmode());

            //WorkModeList.Add(new SpotInspectionRunmode());
            WorkModeList.Add(new SocketSpotInspectionRunmode());

            SelectWorkMode = WorkModeList[0];
            //if (Funs.FunCommSelection.Cur.NeedDailyCheckFirst)
            //{
            //    SelectWorkMode = WorkModeList[3];
            //}
            //else
            //{
            //    SelectWorkMode = WorkModeList[0];
            //}
        }

        /// <summary>
        /// 工作模式集合
        /// </summary>
        public readonly ObservableCollection<StationSelectFunsBase> WorkModeList = new ObservableCollection<StationSelectFunsBase>();

        /// <summary>
        /// 当前选择的工作模式
        /// </summary>
        public StationSelectFunsBase SelectWorkMode { get; private set; }

        public void SetWorkMode(StationSelectFunsBase stationSelectFunsBase)
        {
            SelectWorkMode = stationSelectFunsBase;
        }
    }
}